#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

int f[1000100];
bool notSafe[1000100];

int main(void)
{
	f[0] = 0;
	int n = 15;
	for (int i=1; i<1000010; ++i)
		f[i] = (n+f[i-1])%i;

	while (true) {
		int a, b;
		cin >> a >> b;
		if (a == 0 && b == 0) break;
		if (a>b) swap(a,b);

		memset(notSafe, 0, a/2);
		for (int n=a; n<=b; ++n)
			notSafe[f[n]] = notSafe[(n-f[n])%n] = true;
		bool findSafePos = false;
		for (int i=1; i<a/2; ++i){
			if (!notSafe[i]) {
				findSafePos = true;
				cout << i ;
				break;
			}
		}

		if (!findSafePos) cout << "Better estimate needed" ;
		cout << endl;
	}

	return 0;
}
